package com.itcm.purchase.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author cm_fighting
 * @since 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "PurchaseOrder对象", description = "")
public class PurchaseOrder implements Serializable {

    private static final long serialVersionUID = -5032870134255651301L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
    @ApiModelProperty(value = "日期")
    private Date orderDate;

    @ApiModelProperty(value = "物资名称")
    private String name;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "供应商出厂数量")
    private Double supplierOutNum;

    @ApiModelProperty(value = "实际入库数量")
    private Double realInNum;

    @ApiModelProperty(value = "磅差")
    private Double poundDiff;

    @ApiModelProperty(value = "单价")
    private Double price;

    @ApiModelProperty(value = "运费")
    private Double freight;

    @ApiModelProperty(value = "总金额")
    private Double totalAmount;

    @ApiModelProperty(value = "车牌号")
    private String carNo;

    @ApiModelProperty(value = "是否开票")
    private Boolean hasInvoice;

    private String note;

    @ApiModelProperty(value = "记账")
    private String accountRecord;

    @ApiModelProperty(value = "发票情况")
    private Boolean invoiceFlag;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "zh", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableLogic
    private Boolean isDelete;


}
